package su.kozhevnikov.nookbrary.items;

import su.kozhevnikov.nookbrary.Util;
import su.kozhevnikov.nookbrary.providers.BaseItemProvider;

public class SettingsListItem {
	
	protected String Value = Util.EMPTYSTR;
	protected String Title = Util.EMPTYSTR;
	protected int Count	= 0;
	protected int Method = BaseItemProvider.NO_FILTER;
	
	public SettingsListItem(String Value, String Title, int Method, int Count) {
		this.Value = Value;
		this.Title = Title;
		this.Count = Count;
		this.Method = Method;
	}

	public SettingsListItem(String Value, String Title, int Method) {
		this.Value = Value;
		this.Title = Title;
		this.Count = 1;
		this.Method = Method;
	}
	
	public void incCount() {
		this.Count++;
	}

	public String getValue() {
		return this.Value;
	}
	
	public String getTitle() {
		return this.Title;
	}
	
	public int getCount() {
		return this.Count;
	}
	
	public int getMethod() {
		return this.Method;
	}
	
	@Override
	public String toString() {
		return this.Value;
	}
	
	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		if (o instanceof SettingsListItem) {
			return ((SettingsListItem)o).Value.equalsIgnoreCase(this.Value);
		}
		return super.equals(o);
	}
}

